import java.util.Scanner;

/**
 * 找出字符串中第一个只出现一次的字符
 *
 */
public class HJ59 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            String str = scanner.nextLine();
            int[] ints = new int[26];
            for (int i = 0; i < str.length(); i++) {
                char c = str.charAt(i);
                ints[c-'a']++;
            }

            for (int i = 0; i < str.length(); i++) {
                char c = str.charAt(i);
                if(ints[c-'a'] == 1){
                    System.out.println(c);
                    return;
                }
            }
            System.out.println(-1);
        }
    }
}
